package org.dx.oho.entity;

import java.util.Date;
import java.util.Objects;

/**
 * create by duanx 2020/11/5
 *@description： 用户信息表
 *@classname: PersonInfo
 *@author: duanx
 *@date: 2020/11/5 14:28
 **/
public class PersonInfo extends BaseEntity{
    /**
     * 用户Id
     */
    private Long userId;
    /**
     * 用户姓名
     */
    private String name;
    /**
     *头像
     */
    private String profileImg;
    /**
     * 用户邮箱
     */
    private String email;
    /**
     * 性别
     */
    private String gender;
    /**
     * 启用状态 0-禁用 1-允许
     */
    private Integer enableStatus;
    /**
     * 用户类型 0-超级管理员 1-区划管理员 2-店家 3-顾客
     */
    private Integer userType;
    /**
     * 本地账号信息
     */
    private LocalAuth localAuth;
    /**
     * 微信账号信息
     */
    private WeChatAuth weChatAuth;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProfileImg() {
        return profileImg;
    }

    public void setProfileImg(String profileImg) {
        this.profileImg = profileImg;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getEnableStatus() {
        return enableStatus;
    }

    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public LocalAuth getLocalAuth() {
        return localAuth;
    }

    public void setLocalAuth(LocalAuth localAuth) {
        this.localAuth = localAuth;
    }

    public WeChatAuth getWeChatAuth() {
        return weChatAuth;
    }

    public void setWeChatAuth(WeChatAuth weChatAuth) {
        this.weChatAuth = weChatAuth;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PersonInfo that = (PersonInfo) o;
        return Objects.equals(userId, that.userId) &&
                Objects.equals(name, that.name) &&
                Objects.equals(profileImg, that.profileImg) &&
                Objects.equals(email, that.email) &&
                Objects.equals(gender, that.gender) &&
                Objects.equals(enableStatus, that.enableStatus) &&
                Objects.equals(userType, that.userType) &&
                Objects.equals(localAuth, that.localAuth) &&
                Objects.equals(weChatAuth, that.weChatAuth);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId, name, profileImg, email, gender, enableStatus, userType, localAuth, weChatAuth);
    }

    @Override
    public String toString() {
        return "PersonInfo{" +
                "userId=" + userId +
                ", name='" + name + '\'' +
                ", profileImg='" + profileImg + '\'' +
                ", email='" + email + '\'' +
                ", gender='" + gender + '\'' +
                ", enableStatus=" + enableStatus +
                ", userType=" + userType +
                ", localAuth=" + localAuth +
                ", weChatAuth=" + weChatAuth +
                '}';
    }
}
